package swa23.provider.impl;
 
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URL;
 
public class Utils {
	public static void waitUntilAvailable(URI uri) {
		try {
			HttpURLConnection huc = (HttpURLConnection)uri.toURL().openConnection();
			huc.setConnectTimeout(300000);
			huc.setRequestMethod("GET");
			huc.connect();
			huc.getResponseCode();
		} catch (Exception e) {
			waitUntilAvailable(uri);
		}
	}
}
